package cn.hotel.utlis;

import java.util.ArrayList;
import java.util.List;

public class Paging<T> {
    //当前页
    private int current = 1;
    //每页几条数据
    private int numData = 5;
    //总数据量
    private int sumData;
    //总页
    private int sumPage;

    private List<T> pagingList = new ArrayList<>();

    public List<T> getPagingList() {
        return pagingList;
    }

    public void setPagingList(List<T> pagingList) {
        this.pagingList = pagingList;
    }


    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public int getNumData() {
        return numData;
    }

    public void setNumData(int numData) {
        this.numData = numData;
    }

    public int getSumData() {
        return sumData;
    }

    public void setSumData(int sumData) {
        this.sumData = sumData;
        int num = sumData % numData == 0? sumData / numData : sumData / numData + 1;
        this.sumPage=num;
    }

    public int getSumPage() {
        return sumPage;
    }

    public void setSumPage(int sumPage) {
        this.sumPage = sumPage;
    }
}
